package com.yanghui.service.impl;

import com.yanghui.dao.UserMapper;
import com.yanghui.pojo.User;
import com.yanghui.pojo.UserExample;
import com.yanghui.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    /**
     * 查询用户名是否存在
     */
    @Override
    public User selectUserByUsername(String username) {
        return userMapper.selectUserByUsername(username);
    }

    /**
     * 查询用户名和密码是否正确
     */
    @Override
    public boolean selectUserByUsernameOfPassword(String username, String password) {
        return false;
    }

    @Override
    public int updateUser(User user) {
        return userMapper.updateByPrimaryKeySelective(user);
    }
}
